package com.yang.project.base.proxy;

import java.lang.reflect.Proxy;

/**
 * jdk动态代理工厂类
 */
public class JDKProxyFactory {
    public static Object newProxy(Object target) {
        return Proxy.newProxyInstance(target.getClass().getClassLoader(),
                target.getClass().getInterfaces(),
                new MyInvocationHandle(target));
    }
}
